{include file="public/header" /}
<style>
    .layui-form-select dl dd {
        text-align: center;
    }
    .layui-form-select .layui-input {
        border: none;
        padding-left: 0 !important;
        text-align: right;
        width: 100%;
    }
</style>
<body>
<div class="header">
    <i class="layui-icon layui-icon-left" onclick="goBack()"></i> 绑定{$title}
</div>
<form action="{:url('user/methodSave',['type'=>$type])}" method="post" class="form layui-form">
    <ul class="upd-phone-list">
        {if $type == 'bank'}
        <li>
            <p>银行名称</p>
            <select name="bank_name" lay-verify="required" lay-reqtext="请选择银行">
                <option value="">请选择</option>
                {foreach name="bank_list" item="vo" }
                <option value="{$vo}" {if $user.bank_name == $vo}selected{/if}>{$vo}</option>
                {/foreach}
            </select>
        </li>
        <li>
            <p>开户姓名</p>
            <input type="text" name="bank_account_name" lay-verify="required" lay-reqtext="请输入开户姓名"
                   placeholder="请输入开户姓名" value="{$user.bank_account_name}" autocomplete="off">
        </li>
        <li>
            <p>银行卡号</p>
            <input type="number" name="bank_number" lay-verify="required" lay-reqtext="请输入银行卡号"
                   placeholder="请输入银行卡号" value="{$user.bank_number}" autocomplete="off">
        </li>
        <li>
            <p>开户行地址</p>
            <input type="text" name="bank_open" lay-verify="required" lay-reqtext="请输入开户行地址"
                   placeholder="请输入开户行地址" value="{$user.bank_open}" autocomplete="off">
        </li>
        {else}
        <li>
            <p>真实姓名</p>
            <input type="text" name="name" lay-verify="required" lay-reqtext="请输入真实姓名"
                   placeholder="请输入真实姓名" value="<?php echo $user[$type . '_name']?>" autocomplete="off">
        </li>
        <li class="upd-label">
            <p>{$title}收款码</p>
            <p class="flex-center" id="uploads_image">
                <img src="<?php echo $user[$type . '_image'];?>" onerror="this.src='/static/index/img/icon15.png'"  alt="" id="image_show">
                <input type="hidden" name="image" id="images_value" value="<?php echo $user[$type . '_image'];?>"/>
            </p>
        </li>
        {/if}
    </ul>
    <p class="save upd-save" lay-submit lay-filter="save" formObj=".form">保存</p>
</form>
</body>
{include file="public/footer" /}
</html>